<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<div class="sipangloyudsdwecx" style="border-bottom:1px solid #dadada; border-right:1px solid #dadada;">
			<div id="wfsx" style="height: 100%;width: 100%"></div>
</div>
<div class="sipangloyudsdwecx" style="border-bottom:1px solid #dadada;">
			<div id="wfcj" style="height: 100%;width: 100%"></div>
</div>
<!-- <div class="sipangloyudsdwecx" style=" border-right:1px solid #dadada;">
			<div id="wfsh" style="height: 100%;width: 100%"></div>
</div>
<div class="sipangloyudsdwecx">
			<div id="wfrk" style="height: 100%;width: 100%"></div>
</div> -->
				
<script type="text/javascript">
     function initwfsx(tjld){
    	 $.ajax({
 			url:'${ctx}/homebt/cjcount.htm',
 			type:'POST',
 			dataType:'json',
 			data:{
				tjld:tjld
			},
			success:function(data, textStatus, jqXHR){
 				initHighCharts(data);//采集数据统计
 				initHighCharts1(data);//申请量统计
 			},
 			error:function(XMLHttpRequest, textStatus, errorThrown){
 			}
 		});
     }
     //采集饼状图
     function initHighCharts(data){
    	 
    	var cjdcjTotal=0;
   		var cjdshTotal=0;
   		var cjyshTotal=0;
   		var cxcjTotal=0;
   		for(var i=0;i<data.length;i++){
   			cjdcjTotal+=data[i].cjdcjTotal;
   			cjdshTotal+=data[i].cjdshTotal;
   			cjyshTotal+=data[i].cjyshTotal;
   	   		cxcjTotal+=data[i].cxcjTotal;
   		}
 		  $('#wfsx').highcharts({
 			chart: {
 				plotBackgroundColor: null,
 				plotBorderWidth: null,
 				plotShadow: false
 			},
 			title: { text: '档案采集统计' }, 
 			tooltip: { 
 				 pointFormat: '{series.name}: <b>{point.y}条</b>'
 			},
 			plotOptions: { 
 				pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: false
                    },
                    showInLegend: true
                }
 			},
 		    credits:{
 		       	text: '',
 	           	href: ''
 		    },
 		    exporting:{
 		        enabled: false
 		    },
 			series: [{ 
 				type: 'pie', 
 				name: '数量', 
 				data: [['待采集',cjdcjTotal],
	                    ['待审核',cjdshTotal],
 				         ['已审核',cjyshTotal],
 				         ['重采集',cxcjTotal]]
 			}] 
 	    }); 
     } 
/*      //违法采集
     function initwfcj(tjld){
    	 $.ajax({
 			url:'${ctx}/homebt/wfcjcounts.htm',
 			type:'POST',
 			dataType:'json',
 			data:{
				tjld:tjld
			},
			success:function(data, textStatus, jqXHR){
 				initHighCharts1(data);//违法筛选
 			},
 			error:function(XMLHttpRequest, textStatus, errorThrown){
 			}
 		});
     } */
     //采集饼状图
     function initHighCharts1(data){
    	 var xzdshTotal=0
    	 var xzbtgTotal=0;
    	 var xzbtgTotal=0;
    		for(var i=0;i<data.length;i++){
    		    xzdshTotal+=data[i].xzdshTotal;
    		    xzbtgTotal+=data[i].xzbtgTotal;
    	    	xzbtgTotal+=data[i].xzbtgTotal;
       		}
 		$('#wfcj').highcharts({
 			chart: { 
 				plotBackgroundColor: null,
 				plotBorderWidth: null,
 				plotShadow: false
 			},
 			title: { text: '下载申请量统计' }, 
 			tooltip: { 
 				 pointFormat: '{series.name}: <b>{point.y}条</b>'
 			},
 			plotOptions: { 
 				pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: false
                    },
                    showInLegend: true
                }
 			},
 		    credits:{
 		       	text: '',
 	           	href: ''
 		    },
 		    exporting:{
 		        enabled: false
 		    },
 			series: [{ 
 				type: 'pie', 
 				name: '数量', 
 				data: [['待审核',xzdshTotal],
				         ['已审核',xzbtgTotal],
				         ['不通过',xzbtgTotal]]
 			}] 
 	    });
     }
 /*     //违法审核饼状图 
     function initwfsh(tjld){
    	 $.ajax({
 			url:'${ctx}/homebt/wfshcounts.htm',
 			type:'POST',
 			dataType:'json',
 			data:{
				tjld:tjld
			},
			success:function(data, textStatus, jqXHR){
 				initHighCharts2(data);//违法筛选
 			},
 			error:function(XMLHttpRequest, textStatus, errorThrown){
 			}
 		});
     } */
     
     //违法审核饼状图
     function initHighCharts2(data){
 		var wsh=0;
 		var shtg=0;
 		var shbtg=0;
 		 for(var i=0;i<data.length;i++){
 			if(data[i].shbz== "0"){
 				wsh += data[i].count;
 			} else if(data[i].shbz== "1" ||data[i].shbz== "3"){
 				shtg += data[i].count;
 			}else{
 				shbtg += data[i].count;
 			}
 		}
 		$('#wfsh').highcharts({
 			chart: { 
 				plotBackgroundColor: null,
 				plotBorderWidth: null,
 				plotShadow: false
 			},
 			title: { text: '违法审核比例图' }, 
 			tooltip: { 
 				 pointFormat: '{series.name}: <b>{point.y}条</b>'
 			},
 			plotOptions: { 
 				pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: false
                    },
                    showInLegend: {
    					enabled: true
    				}
                }
 			},
 		    credits:{
 		       	text: '',
 	           	href: ''
 		    },
 		    exporting:{
 		        enabled: false
 		    },
 			series: [{
 				type: 'pie', 
 				name: '数量', 
                data: [['未审核',wsh],
                    ['审核通过',shtg],
                    ['审核不通过',shbtg]]
            }] 
 	    });
     }

/*    //违法入库饼状图 
     function initwfrk(tjld){
    	 $.ajax({
 			url:'${ctx}/homebt/wfrkcounts.htm',
 			type:'POST',
 			dataType:'json',
 			data:{
				tjld:tjld
			},
			success:function(data, textStatus, jqXHR){
 				initHighCharts3(data);//违法筛选
 			},
 			error:function(XMLHttpRequest, textStatus, errorThrown){
 			}
 		});
     } */
     
     //违法入库饼状图
     function initHighCharts3(data){
    	 var yrk=0;
		 var wrk=0;
  		 for(var i=0;i<data.length;i++){
  			if(data[i].rkbz== "0"){
  				wrk += data[i].count;
  			}else if(data[i].rkbz== "1"){
  				yrk += data[i].count;
  			}
  		}
 		$('#wfrk').highcharts({
 			chart: { 
 				plotBackgroundColor: null,
 				plotBorderWidth: null,
 				plotShadow: false
 			},
 			title: { text: '违法入库比例图' }, 
 			tooltip: { 
 				 pointFormat: '{series.name}: <b>{point.y}条</b>'
 			},
 			plotOptions: { 
 				pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: false
                    },
                    showInLegend: true
                }
 			},
 		    credits:{
 		       	text: '',
 	           	href: ''
 		    },
 		    exporting:{
 		        enabled: false
 		    },
 			series: [{ 
 				type: 'pie', 
 				name: '数量', 
 				data: [['已入库',yrk],['未入库',wrk]]
 			}] 
 	    });
     }
</script>
				
				
				
				
				